package com.xinruke.hostels.manage.user.interfaces.api;

import com.xinruke.hostels.common.vo.ResultVO;
import com.xinruke.hostels.manage.user.interfaces.dto.UserDetailQueryDTO;
import com.xinruke.hostels.manage.user.interfaces.dto.UserDetailQueryResultDTO;
import com.xinruke.hostels.manage.user.interfaces.dto.UserInfoAddDTO;
import com.xinruke.hostels.manage.user.interfaces.dto.UserInfoAddDefaultDTO;
import com.xinruke.hostels.manage.user.interfaces.dto.login.LoginManageValidateDTO;
import com.xinruke.hostels.manage.user.interfaces.dto.login.LoginManageValidateResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * @ClassName LoginApi
 * @CreateDate 2019/6/12
 * @Author FengXinQiang
 * @Version V1.0.0.0
 * @Decription 登录API
 */
@FeignClient(value = "manage-user-service", fallbackFactory = ManageUserFallback.class)
public interface ManageUserApi {
    @PostMapping("/login/loginValidate")
     ResultVO<LoginManageValidateResultDTO> loginValidate(@RequestBody LoginManageValidateDTO loginValidateDTO);

     @PostMapping("user/info/detail")
     ResultVO<UserDetailQueryResultDTO> detail(@Valid @RequestBody UserDetailQueryDTO userDetailQueryDTO);

    @PostMapping(value = "/user/info/hotel/add")
    ResultVO addHotelUserInfo(@Valid @RequestBody UserInfoAddDefaultDTO userInfoAddDTO);


}
